package com.baizhi.controller;

import com.baizhi.service.PmsCategoryService;
import com.baizhi.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Max;

/**
 * @author yu
 */
@RestController
@Validated
public class PmsCategoryController {
    @Autowired
    private PmsCategoryService pmsCategoryService;

    @GetMapping("/categories/{categoryId}")
    public R showCategories(@Max (value = 777) @PathVariable("categoryId")Long categoryId){
        R r = pmsCategoryService.showCategories(categoryId);
        return r;
    }
}
